﻿@model AMAP.Areas.Admin.Models.Basket.AdminBasketCompositionViewModel
@{
    ViewBag.Title = "Confection des paniers";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Composition du panier</h2>
@if (Model.DayOfWeek == 0)
{
    <p>Bonjour, avant de commencer, vous devez spécifier pour quel jour vous souhaitez préparer les paniers :</p>
    <ul>
        <li>
            @Html.RouteLink("Mardi", "Admin_default", new { controller = "Basket", action = "Composition", DayOfWeek = (int)DayOfWeek.Tuesday })
        </li>
        <li>
            @Html.RouteLink("Jeudi", "Admin_default", new { controller = "Basket", action = "Composition", DayOfWeek = (int)DayOfWeek.Thursday })
        </li>
    </ul>
}
else
{ 

    <p>Il y a <span>@Model.NumberOfBasket panier@(@Model.NumberOfBasket > 1 ? "s" : "")</span> à assembler pour <strong>@(Model.DayOfWeek == 2 ? Html.RouteLink("mardi", "Admin_default", new { controller = "Basket", action = "Composition", DayOfWeek = (int)DayOfWeek.Thursday }, new { title = "changer de jour" }) : Html.RouteLink("jeudi", "Admin_default", new { controller = "Basket", action = "Composition", DayOfWeek = (int)DayOfWeek.Tuesday }, new { title = "changer de jour" }))</strong></p>
    if (Model.Items.Count > 0)
    { 
    <ul style="list-style: square">
        @foreach (var e in Model.Items)
        { 
            <li>@e.Quantity @e.Unit de @e.Name</li>
        }
    </ul>
    <a onclick="window.print();" style="background: url('/Content/Images/ico-printable-printer.png') no-repeat; padding: 0 0 0 28px; line-height: 23px; min-height: 23px; font-size: 12px; display: block; cursor: pointer">Imprimer cette page</a>
    }
    else
    {
    <p>
        Aucun panier n'a été trouvé pour cette semaine
    </p>
    }
}
